<template>
	<view class="pay-successs">
		<image class="img" src="../../static/images/order/pay-success.png"></image>
		<view class="title">支付成功</view>
		<view class="tips">点击下方按钮可查看订单信息喔～</view>
		<view class="btn" @click="onViewOrderTap">查看订单</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				dataObj: {
					payment_type: '',
					order_id: ''
				}
			}
		},
		onLoad(event) {
			this.dataObj['payment_type'] = event['payment_type']; // 获取订单类型
			this.dataObj['order_id'] = event['order_id']; // 获取订单id
		},
		methods: {
			// 查看订单
			onViewOrderTap() {
				const payment_type = this.dataObj['payment_type'];
				const order_id = this.dataObj['order_id'];
				uni.navigateTo({
					url: '/pages/user/assets/order-detail?type=' + payment_type + '&id=' + order_id
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #FFFFFF;
	}
	.pay-successs{
		min-height: 100vh;
		background-color: #FFFFFF;
		text-align: center;
		.img{
			width: 308rpx;
			height: 350rpx;
			margin: 0 auto;
			padding-top: 144rpx;
		}
		.title{
			line-height: 56rpx;
			font-size: 40rpx;
			color: #1A1A1A;
			margin-bottom: 18rpx;
		}
		.tips{
			line-height: 36rpx;
			font-size: 24rpx;
			color: #7F7F7F;
			margin-bottom: 182rpx;
		}
		.btn{
			width: 508rpx;
			height: 90rpx;
			line-height: 90rpx;
			font-size: 30rpx;
			color: #FE6B00;
			background-color: #F7F7F7;
			margin: 0 auto;
			border-radius: 45rpx;
		}
	}
</style>
